import * as echarts from 'echarts/core'
// 水波纹图
import 'echarts-liquidfill'
import {
  BarChart,
  LineChart,
  PieChart,
  RadarChart,
  PictorialBarChart,
  EffectScatterChart,
  MapChart
} from 'echarts/charts'
import { SVGRenderer } from 'echarts/renderers'
import {
  TooltipComponent,
  GridComponent,
  LegendComponent,
  TitleComponent,
  GeoComponent,
  ToolboxComponent,
  VisualMapComponent
} from 'echarts/components'
import fruitTheme from '@/assets/echarts-theme/fruit'
import darkTheme from '@/assets/echarts-theme/dark'
import lightTheme from '@/assets/echarts-theme/light'
echarts.use([
  VisualMapComponent,
  ToolboxComponent,
  GeoComponent,
  BarChart,
  LineChart,
  PieChart,
  EffectScatterChart,
  RadarChart,
  PictorialBarChart,
  SVGRenderer,
  TooltipComponent,
  GridComponent,
  LegendComponent,
  TitleComponent,
  MapChart
])

echarts.registerTheme('fruit', fruitTheme)
echarts.registerTheme('new-dark', darkTheme)
echarts.registerTheme('new-light', lightTheme)

export default echarts
